// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "AbilitySystem/Abilities/AuraGameplayAbility.h"
#include "AuraSummonAbility.generated.h"

/**
 * 召唤技能基类
 */
UCLASS()
class AURA_API UAuraSummonAbility : public UAuraGameplayAbility
{
	GENERATED_BODY()

public:
	
	/** 召唤的数量 */
	UPROPERTY(EditDefaultsOnly, Category = "AuraSummonAbility|Summon")
	int32 NumMinions;

	/** 召唤的类 */
	UPROPERTY(EditDefaultsOnly, Category = "AuraSummonAbility|Summon")
	TArray<TSubclassOf<APawn>> MinionClasses;

	/** 召唤物距离召唤师最近的距离 */
	UPROPERTY(EditDefaultsOnly, Category = "AuraSummonAbility|Summon")
	float MinSpawnDistance = 50.f;

	/** 召唤物距离召唤师最远的距离 */
	UPROPERTY(EditDefaultsOnly, Category = "AuraSummonAbility|Summon")
	float MaxSpawnDistance = 250.f;

	/** 召唤物在召唤师前面的角度范围 */
	UPROPERTY(EditDefaultsOnly, Category = "AuraSummonAbility|Summon")
	float SpawnSpread = 90.f;

	/** 获取召唤物位置 */
	UFUNCTION(BlueprintCallable)
	TArray<FVector> GetSpawnLocations();

	/** 获取随机召唤物类 */
	UFUNCTION(BlueprintPure, Category = "AuraSummonAbility|Summon")
	TSubclassOf<APawn> GetRandomMinionClass();
};
